package com.tjetc.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tjetc.enums.EnumSex;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/*
* 地址本
* */
@Data
public class UserAddress {
    //地址id
    private Integer id;
    //用户id
    private Integer userId;
    //接收人
    private String consignee;
    //性别
    @JsonFormat(shape = JsonFormat.Shape.NUMBER)
    private EnumSex sex;
    //电话
    private String phone;
    //省编码
    private Integer provinceCode;
    //省名称
    private String provinceName;
    //城编码
    private Integer cityCode;
    //城名称
    private String cityName;
    //区编码
    private Integer districtCode;
    //区名称
    private String districtName;
    //详细地址
    private String detail;
    //是否为默认地址
    private Integer isDefault;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
